A stereo camera device that calculates the distance to a subject using a plurality of cameras is known. For example, in the automotive field, the distance ahead to a vehicle, an obstacle, or the like is calculated using the stereo camera device. The calculated distance is used for driving assistance such as warning the driver to avoid a collision and controlling the accelerator and the brakes in automatic cruise control.
The stereo camera device calculates the distance from a difference between images captured by two cameras. An error in alignment of the two cameras causes a significant error in the calculated distance. Frequent calibration is therefore necessary. It is, however, difficult to perform such high-accuracy calibration by mechanical adjustment each time.
An electronic calibration method for automatically determining an alignment error based on images captured by cameras and correcting a distance depending on the determined alignment error has been proposed (for example see JP 2008-509619 A (PTL 1)). The electronic calibration method detects, from a right image and a left image captured by a stereo camera, two or more straight lines corresponding to road boundary marking lines arranged in parallel with each other on a road. The electronic calibration method then determines, for each of the left image and the right image, the coordinates of a vanishing point at which the two straight lines converge. The electronic calibration method compares the coordinates of the vanishing point between the left image and the right image, and determines an alignment error.